import DEFAULT_PORTRAIT from '../assets/img/default.png'

export const imgPath = (path, defaultImg = DEFAULT_PORTRAIT) =>
  path ? /^(https?:\/|data:image)\//ig.test(path) ? path : 'http://localhost:8090/manage/image/upload/' + path : defaultImg
